import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('../views/Home'),
    },
    {
        path: '/fund',
        name: 'fund',
        component: () => import('../views/Fund')
    }
]

const router = new VueRouter({
    mode: 'history',
    routes
})
const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error => error)
}
export default router
